package one;

public class Day08_Climbing_Stairs {
    public int climbStairs(int n) {
        if (n <= 2) {
            return n;
        }
        int first = 1;
        int second = 2;
        for (int i = 2; i < n; i++) {
            int tmp = second;
            second += first;
            first = tmp;
        }
        return second;
    }
}
